package com.csg.ioms.controller;

import com.alibaba.fastjson.JSON;
import com.csg.ioms.annotation.RequestUser;
import com.csg.ioms.model.RequestSubject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *
 * </p>
 *
 * @author GeorgeChan 2020/2/2 17:54
 * @version 1.0
 * @since jdk1.8
 */
@RestController
@RequestMapping("/api/system")
public class HelloController {
    private static final Logger LOGGER = LoggerFactory.getLogger(HelloController.class);

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String hello(@RequestUser RequestSubject subject) {
        LOGGER.info("当前登录用户***********");
        LOGGER.info(JSON.toJSONString(subject));
        LOGGER.info("当前登录用户***********");
        return "hello world";
    }
}
